package com.ibm.risk.irmp.base.auth.service;


import com.ibm.risk.irmp.base.auth.entity.SystemUser;
import com.ibm.risk.irmp.base.auth.vo.UserSearchParam;
import com.ibm.risk.irmp.base.auth.vo.UserVO;
import com.ibm.risk.irmp.common.auth.IUserService;
import com.ibm.risk.irmp.common.auth.vo.RoleVo;
import com.ibm.risk.irmp.common.vo.PagedResult;

import java.util.List;

public interface IUserManagementService extends IUserService {
    String RWA_LOGIN_DATA_CACHE = "IrmpLoginDataCache";

    PagedResult<UserVO> searchUser(UserSearchParam searchParam);

    /**
     * 根据 username 查找用户信息
     * @param username
     * @return UserVO
     */
    SystemUser getUserByUsername(String username);

    /**
     * 保存用户
     * @param user
     * @return Boolean
     */
    Boolean saveUser(SystemUser user);

    List<RoleVo> showRole();

    Boolean deleteUser(String username);

    Boolean saveNewUser(SystemUser user, String bizBranchCode, String mngBranchCode, List<String> roles);

    Boolean updateUser(SystemUser user, String bizBranchCode, String mngBranchCode, List<String> roles);

    Boolean updatePassword(String username, String password);

}
